package com.zkthink.ceres.applet.feedback.controller;

import com.zkthink.base.R;
import com.zkthink.ceres.applet.common.domin.PageDate;
import com.zkthink.ceres.applet.common.domin.vo.PageDateTypeIdVo;
import com.zkthink.ceres.applet.feedback.domain.vo.AddAppletFeedBackVo;
import com.zkthink.ceres.applet.feedback.service.AppletFeedbackService;
import com.zkthink.ceres.applet.homePage.domain.vo.FindCategoryListPageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author cmz
 * @Date 2024-05-11 15:08
 */
@Slf4j
@Validated
@RestController
@RequestMapping("/applet/feedback")
@Api(value = "feedback", tags = "意见反馈")
public class AppletFeedBackController {
    
    @Resource
    private AppletFeedbackService appletFeedbackService;
    
    @ApiOperation(value = "增加意见反馈信息", notes = "增加意见反馈信息")
    @PostMapping(value = "/insert")
    public R insert(@RequestBody AddAppletFeedBackVo addAppletFeedBackVo) {
        return appletFeedbackService.insert(addAppletFeedBackVo);
    }

    @ApiOperation(value = "查询反馈记录", notes = "查询反馈记录")
    @PostMapping(value = "/findFeedback")
    public R findFeedback(@RequestBody PageDate pageDate) {
        return appletFeedbackService.findFeedback(pageDate);
    }
}
